<div id="content">
    <div id="page-heading">
        <h1>Sliders management</h1>
    </div>
    <table border="0" width="100%" cellpadding="0" cellspacing="0" id="content-table">
        <tr>
            <th rowspan="3" class="sized">
                <?php echo $this->Html->image('../images/shared/side_shadowleft.jpg', array('width' => '20', 'height' => '300', 'alt' => '')); ?>
            </th>
            <th class="topleft"></th>
            <td id="tbl-border-top">&nbsp;</td>
            <th class="topright"></th>
            <th rowspan="3" class="sized">
                <?php echo $this->Html->image('../images/shared/side_shadowright.jpg', array('width' => '20', 'height' => '300', 'alt' => '')); ?>
            </th>
	</tr>
	<tr>
            <td id="tbl-border-left"></td>
            <td>
                <div id="content-table-inner">
                    <?php echo $this->Session->flash();?>
                    <div id="table-content" style="height: 130px;min-height: 100px" >
                        <?php echo $this->Form->create("Slider", array('url' => array('controller'=>'users','action'=>'sliders'),'type'=>'file')); 
                         ?>
                        <table border="0" width="100%" cellpadding="0" cellspacing="0" id="id-form">
                            <tr>
                                <th valign="top">Image</th>
                                <td>
                                    <?php
                                        echo $this->Form->input('image', array(
                                                'label'     => false,
                                                'div'       => false,
                                                'type'      =>'file',
                                                'class'     => 'med')
                                        );
                                    ?>      
                                </td>
                                <td></td> 
                            </tr>
                            <tr>
                                <th valign="top">Url</th>
                                <td>
                                    <?php
                                        echo $this->Form->input('image_url', array(
                                                'label'     => false,
                                                'div'       => false,
                                                'value'     =>'http://',
                                                'class'     => 'inp-form med')
                                        );
                                    ?>      
                                </td>
                                <td></td> 
                            </tr>
                        </table>
                        <?php 
                        echo $this->Form->submit('Upload', array('class' => 'button','id'=>"Search",'div'=>false));
                        echo $this->Form->end();
                        ?>
                    </div>
                    <div id="table-content">
                        <table border="0" width="100%" cellpadding="0" cellspacing="0" id="product-table">
                            <tr>
                                <th class="table-header-repeat line-left">
                                    Image
                                </th>
                                <th class="table-header-repeat line-left">
                                    Links
                                </th>
                                <th class="table-header-repeat line-left">Options</th>
                            </tr>
                            <?php 
                                $alt = 0;
                                foreach($values as $value): 
                                    $alt_row = $alt % 2;
                                    $alt_rows = ($alt_row == 1)? 'alternate-row': '';
                            ?>
                            <tr class="<?php echo $alt_rows; ?>">
                                <td>
                                    <?php echo $this->Html->image('Sliders/thumb/'.$value["Slider"]['image']); ?>
                                </td>
                                <td>
                                    <?php echo $value["Slider"]['image_url']; ?>
                                </td>
                                <td width="100" class="options-width">
                                    <?php 
                                        echo $this->Html->link(' ', array('controller' => 'users', 'action' => 'slider_delete', $value["Slider"]['id']), array('title' => "Delete",'onclick'=>"return confirm('Are you sure to delete this image ?')", "class" => "icon-2 info-tooltip"));
                                    ?>
                                </td>
                            </tr>
                            <?php 
                                $alt++;
                                endforeach; 
                            ?>
                        </table>
                    </div>
                    <div class="clear"></div>
                </div>
            </td>
            <td id="tbl-border-right"></td>
        </tr>
        <tr>
            <th class="sized bottomleft"></th>
            <td id="tbl-border-bottom">&nbsp;</td>
            <th class="sized bottomright"></th>
        </tr>
    </table>
    <div class="clear">&nbsp;</div>
</div>
<script type="text/javascript">
jQuery(document).ready(function(){
            jQuery("#slidersMenu").addClass('current');
});
</script>